<?php $this->load->view('template/header'); ?>

<?php $this->load->view('template/common/fronthead'); ?>

<?php $this->load->view('template/common/navigator'); ?>

<?php $this->load->view('template/common/slider'); ?>

<?php $this->load->view('template/common/bottombar'); ?>

<?php $this->load->view('template/common/loginpanel'); ?>

    <div class="container-fluid">

        <!-- Example row of columns -->
        <div class="row-fluid">

            <div class="span12">

                <div class="page-header">
                    <h1>Smartphone và Máy tính bảng <small>Android</small></h1>
                </div>

                <div class="row-fluid">

                    <div class="span2">
                        <h4>Danh mục phân loại</h4>
                        <div class="accordion" id="accordion2">
                            <div class="accordion-group">
                                <div class="accordion-heading">
                                    <img src="<?php echo base_url('assets'); ?>/img/slider/slider1.jpg" alt="">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion3" href="#collapseOne">
                                        <?php echo $this->category_model->get_category('1')->category_name; ?>
                                    </a>
                                </div>
                                <div id="collapseOne" class="accordion-body collapse">
                                    <div class="accordion-inner">
                                        <ul class="nav nav-tabs nav-stacked">
                                            <?php $categories = $this->category_model->get_category_related('PL001');

                                                foreach($categories as $c): ?>

                                                    <li><a href="<?php echo site_url(); ?>/page/<?php echo $c['category_id_related']; ?>"><?php echo $this->category_model->get_category($c['category_id_related'])->category_name; ?></a></li>

                                             <?php endforeach; ?>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="accordion-group">
                                <div class="accordion-heading">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion3" href="#collapseTwo">
                                        <?php echo $this->category_model->get_category('PL010')->category_name; ?>
                                    </a>
                                </div>
                                <div id="collapseTwo" class="accordion-body collapse">
                                    <div class="accordion-inner">
                                        <ul class="nav nav-tabs nav-stacked">
                                            <?php $categories = $this->category_model->get_category_related('PL010');
                                            if ($categories != FALSE){
                                                foreach($categories as $c1): ?>

                                                    <li><a href="<?php echo site_url(); ?>/page/<?php echo $c1['category_id_related']; ?>"><?php echo $this->category_model->get_category($c1['category_id_related'])->category_name; ?></a></li>

                                                    <?php endforeach; } ?>

                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="span8">
                        <ul class="nav nav-tabs" id="myTab">
                            <li class="active"><a href="#new-product" data-toggle="tab">Sản phẩm mới</a></li>
                            <li><a href="#sale-product" data-toggle="tab">Bán chạy</a></li>
                            <li><a href="#saleoff-product" data-toggle="tab">Đang khuyến mãi</a></li>
                            <li><a href="#preorder-product" data-toggle="tab">Sắp có hàng</a></li>
                            <li><a href="#list-product" data-toggle="tab">Đã trình làng</a></li>
                        </ul>

                        <div class="tab-content">
                            <div class="tab-pane active" id="new-product">
                                <div id="new-product-list">
                                    <?php $this->load->view('cart/products'); ?>
                                </div>
                            </div>
                            <div class="tab-pane" id="sale-product">
                                <div id="sale-product-list">
                                    <h1>Bán chạy...</h1>
                                </div>
                            </div>
                            <div class="tab-pane" id="saleoff-product">
                                <div id="saleoff-product-list">
                                    <h1>Đang khuyến mãi</h1>
                                </div>
                            </div>
                            <div class="tab-pane" id="preorder-product">
                                <div id="preorder-product-list">
                                    <h1>Sắp có hàng</h1>
                                </div>
                            </div>
                            <div class="tab-pane" id="intro-product">
                                <div id="intro-product-list">
                                    <h1>Đã trình làng...</h1>
                                </div>
                            </div>
                        </div>

                    </div>

                    <div class="span2">
                        <h4>Quảng cáo và các slider hàng hóa nổi bật</h4>
                    </div>

                </div>
            </div>

        </div>

        <hr>




<!--        <a href="#modal" class="second">Link text</a>-->
        <!--<div id="modal" style="display:none">
            <h2>Shopping cart</h2>

            <a role="button" class="btn btn-small btn-warning" href="javascript:$.pageslide.close()">Close</a>
        </div>-->


<?php

$data['is_cart'] = true;
$data['is_product'] = true;
$data['is_loginpanel'] = true;
$this->load->view('template/footer', $data); ?>